package com.lingz.manager.modules.wuxue.controller;

import com.lingz.manager.common.utils.ResultUtil;
import com.lingz.manager.common.vo.Result;
import com.lingz.manager.modules.wuxue.entity.YikemanData;
import com.lingz.manager.modules.wuxue.service.YikemanDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.util.List;

/**
 * @Classname YikemanDataController
 * @Description TODO
 * @Date 2023/12/2 20:26
 * @Created by mjh
 */
@Slf4j
@RestController
@Api(description = "依科曼虫情数据接口")
@RequestMapping("/wuxue/yikemanData")
@Transactional
public class YikemanDataController {

    @Autowired
    YikemanDataService yikemanDataService;

    @GetMapping("/findYikemanDataList")
    @ApiOperation("不分页查询依科曼虫情数据")
    public Result<List<YikemanData>> findDailyInsectCatchDataList(YikemanData yikemanData) throws IOException {
        return new ResultUtil<List<YikemanData>>().setData(yikemanDataService.findYikemanDataList(yikemanData));
    }
}
